//
//  Director.m
//  OC1_类和对象课后作业
//
//  Created by dllo on 15/10/22.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "Director.h"

@implementation Director

-(id)init
{

    _name = @"WangJing";
    _sex = @"male";
    _age = 50;
    [self info];
    return self;

}

-(void) info
{

    NSLog(@"%@ %@ %ld", _name, _sex, _age);

}

-(void)direct
{

    NSLog(@"%@拍了一部新动作片", _name);

}

-(NSString *)name
{
    return _name;
}

-(void)setName:(NSString *)name
{
    _name = name;
}
-(NSString *)sex
{
    return _sex;
}
-(void)setSex:(NSString *)sex
{
    _sex = sex;
}
-(NSInteger)age
{
    return _age;
}
-(void)setAge:(NSInteger)age
{
    _age = age;
}
-(id)initWithName:(NSString *)name sex:(NSString *)sex age:(NSInteger)age
{

    _name = name;
    _age = age;
    _sex = sex;
    return self;

}

+ (id)DirectorWithName:(NSString *)name sex:(NSString *)sex age:(NSInteger)age
{
    Director *d = [[Director alloc] initWithName:name sex:sex age:age];
    return d;

}




@end
